import { _decorator, Component, math, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('GameConstant')
export class GameConstant extends Component {

}



export enum EPOCH {
    EPOCH_1 = "冷兵器时代",
    EPOCH_2 = "热兵器时代",
    EPOCH_3 = "工业时代",
    EPOCH_4 = "重兵器时代",
    EPOCH_5 = "核武器时代",
    EPOCH_6 = "反物质时代",
}

export enum EPOCHRANGE {
    EPOCH_1 = 0.018,
    EPOCH_2 = 0.214,
    EPOCH_3 = 0.41,
    EPOCH_4 = 0.606,
    EPOCH_5 = 0.802,
    EPOCH_6 = 1,
}

export const epoch = ["EPOCH_1", "EPOCH_2", "EPOCH_3", "EPOCH_4", "EPOCH_5", "EPOCH_6"];
export const evolutionPrice = [12000, 100000, 40000000, 900000000, 60000000000];

export enum LV {
    LV_1 = "关卡 1",
    LV_2 = "关卡 2",
    LV_3 = "关卡 3",
    LV_4 = "关卡 4",
    LV_5 = "关卡 5",
    LV_6 = "关卡 6",
    LV_7 = "关卡 7",
}

export const weaponPrice = {
    "冷兵器时代": [0, 1500, 6000],
    "热兵器时代": [0, 8000, 20000],
    "工业时代": [0, 1200000, 20000000],
    "重兵器时代": [0, 15000000, 100000000],
    "核武器时代": [0, 70000000, 8000000000],
    "反物质时代": [0, 60000000000, 210000000000],
}

export const baseEnergy = 0.36;
export const addEnergy = 0.04;

export const baseHp = {
    "冷兵器时代": 2,
    "热兵器时代": 24,
    "工业时代": 72,
    "重兵器时代": 800,
    "核武器时代": 2400,
    "反物质时代": 19400,
}

export const addHp = {
    "冷兵器时代": 1,
    "热兵器时代": 5,
    "工业时代": 43,
    "重兵器时代": 100,
    "核武器时代": 200,
    "反物质时代": 300,
}


export const energyPrice = {
    "冷兵器时代": 8,
    "热兵器时代": 8,
    "工业时代": 8,
    "重兵器时代": 8,
    "核武器时代": 8,
    "反物质时代": 8,
}

export const hpPrice = {
    "冷兵器时代": 36,
    "热兵器时代": 288,
    "工业时代": 2300,
    "重兵器时代": 13000,
    "核武器时代": 140000,
    "反物质时代": 1170000,
}

//武器购买价格
export const weaponBuyPrice = {
    "冷兵器时代": [3, 5, 7],
    "热兵器时代": [3, 5, 7],
    "工业时代": [3, 5, 7],
    "重兵器时代": [3, 5, 7],
    "核武器时代": [3, 5, 7],
    "反物质时代": [3, 5, 7],
}

//#region 商城奖励
export const awardTime = 10800;//3小时
export const awardCount = 3;//奖励的次数



//#region 卡片
export const drawCardNeedEX = [0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90];

//卡牌类型
export enum CARDTYPE {
    CARD_GRAY = "CARD_GRAY",
    CARD_BLUE = "CARD_BLUE",
    CARD_PURPLE = "CARD_PURPLE",
    CARD_GOLDEN = "CARD_GOLDEN",
}

//各色卡牌出现的概率 
export enum CARDPROBABILITY {
    CARD_BLUE = 3,
    CARD_PURPLE = 2,
    CARD_GOLDEN = 1,
}

export type Card = {
    type: CARDTYPE;
    number: number;//编号
    grade: number;
    haveCount: number;
};

export const needCard = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];

//卡片路径
export const CardFrame = {
    "CARD_GRAY": "卡片灰框",
    "CARD_BLUE": "卡片蓝框",
    "CARD_PURPLE": "卡片紫框",
    "CARD_GOLDEN": "卡片金框",
}
export const CardImage = {
    "CARD_GRAY": ["灰角色 (1)", "灰角色 (2)", "灰角色 (3)", "灰角色 (4)", "灰角色 (5)", "灰角色 (6)", "灰角色 (7)", "灰角色 (8)"],
    "CARD_BLUE": ["蓝角色 (1)", "蓝角色 (2)", "蓝角色 (3)", "蓝角色 (4)", "蓝角色 (5)", "蓝角色 (6)"],
    "CARD_PURPLE": ["紫角色 (1)", "紫角色 (2)", "紫角色 (3)", "紫角色 (4)"],
    "CARD_GOLDEN": ["金角色 (1)", "金角色 (2)"],
}
//卡片详情里面的
export const CardName = {
    "CARD_GRAY": ["灰角色 (1)", "灰角色 (2)", "灰角色 (3)", "灰角色 (4)", "灰角色 (5)", "灰角色 (6)", "灰角色 (7)", "灰角色 (8)"],
    "CARD_BLUE": ["蓝角色 (1)", "蓝角色 (2)", "蓝角色 (3)", "蓝角色 (4)", "蓝角色 (5)", "蓝角色 (6)"],
    "CARD_PURPLE": ["紫角色 (1)", "紫角色 (2)", "紫角色 (3)", "紫角色 (4)"],
    "CARD_GOLDEN": ["金角色 (1)", "金角色 (2)"],
}
export const CardTypeName = {
    "CARD_GRAY": "普通",
    "CARD_BLUE": "稀有",
    "CARD_PURPLE": "史诗",
    "CARD_GOLDEN": "传说",
}

export const CardTypeColor = {
    "CARD_GRAY": math.color(184, 188, 187),
    "CARD_BLUE": math.color(39, 145, 255),
    "CARD_PURPLE": math.color(176, 38, 255),
    "CARD_GOLDEN": math.color(255, 210, 0),
}
export const CardExplain = {
    "CARD_GRAY": ["灰角色 (1)", "灰角色 (2)", "灰角色 (3)", "灰角色 (4)", "灰角色 (5)", "灰角色 (6)", "灰角色 (7)", "灰角色 (8)"],
    "CARD_BLUE": ["蓝角色 (1)", "蓝角色 (2)", "蓝角色 (3)", "蓝角色 (4)", "蓝角色 (5)", "蓝角色 (6)"],
    "CARD_PURPLE": ["紫角色 (1)", "紫角色 (2)", "紫角色 (3)", "紫角色 (4)"],
    "CARD_GOLDEN": ["金角色 (1)", "金角色 (2)"],
}
//卡片属性
export enum PROPERTY {
    WEAPON_HARM = "全部武器伤害",
    WEAPON_HP = "全部武器生命值",
    ROLE_HP = "角色生命值",
    FOOD = "食物生产速度",
    GOLD = "金币加成",
}

export const CardPropertyType = {
    "CARD_GRAY": ["WEAPON_HARM", "WEAPON_HP", "ROLE_HP", "GOLD", "FOOD", "ROLE_HP", "WEAPON_HARM", "FOOD"],
    "CARD_BLUE": ["WEAPON_HARM", "FOOD", "GOLD", "ROLE_HP", "WEAPON_HP", "WEAPON_HARM"],
    "CARD_PURPLE": ["FOOD", "WEAPON_HARM", "GOLD", "WEAPON_HP"],
    "CARD_GOLDEN": ["FOOD", "WEAPON_HARM"],
}

//卡片增幅
export const CardPropertyAmplification = {
    "CARD_GRAY": {
        "WEAPON_HARM": 5,
        "WEAPON_HP": 5,
        "ROLE_HP": 5,
        "FOOD": 5,
        "GOLD": 5,
    },
    "CARD_BLUE": {
        "WEAPON_HARM": 8,
        "WEAPON_HP": 8,
        "ROLE_HP": 8,
        "FOOD": 8,
        "GOLD": 8,
    },
    "CARD_PURPLE": {
        "WEAPON_HARM": 18,
        "WEAPON_HP": 18,
        "ROLE_HP": 18,
        "FOOD": 18,
        "GOLD": 18,
    },
    "CARD_GOLDEN": {
        "WEAPON_HARM": 25,
        "WEAPON_HP": 25,
        "ROLE_HP": 25,
        "FOOD": 25,
        "GOLD": 25,
    },
}
//#region 战车
export const CarriageSF = {
    "冷兵器时代": [
        "冷兵器时代车厢1",
        "冷兵器时代车厢2",
        "冷兵器时代车厢3",
    ],
    "热兵器时代": [
        "",
        "",
        "",
    ],
    "工业时代": [
        "",
        "",
        "",
    ],
    "重兵器时代": [
        "",
        "",
        "",
    ],
    "核武器时代": [
        "",
        "",
        "",
    ],
    "反物质时代": [
        "",
        "",
        "",
    ],
}
export const weapon = {
    "冷兵器时代": [
        "Game/Weapons/刺",
        "Game/Weapons/弩箭",
        "Game/Weapons/锤子",
    ],
    "热兵器时代": [
        "",
        "",
        "",
    ],
    "工业时代": [
        "",
        "",
        "",
    ],
    "重兵器时代": [
        "",
        "",
        "",
    ],
    "核武器时代": [
        "",
        "",
        "",
    ],
    "反物质时代": [
        "",
        "",
        "",
    ],
}

export enum WEAPON {
    CI = "Game/Weapons/刺",
}

//#region 武器
//武器战力
export const WeaponBattleValue = {
    "冷兵器时代": [2, 4, 8],
    "热兵器时代": [2, 4, 8],
    "工业时代": [2, 4, 8],
    "重兵器时代": [2, 4, 8],
    "核武器时代": [2, 4, 8],
    "反物质时代": [2, 4, 8],
}
export const WeaponHP = {
    "冷兵器时代": [5, 2, 15],
    "热兵器时代": [5, 2, 15],
    "工业时代": [5, 2, 15],
    "重兵器时代": [5, 2, 15],
    "核武器时代": [5, 2, 15],
    "反物质时代": [5, 2, 15],
}
//#region 宝箱

export const treasureBoxTarget = {
    "冷兵器时代": {
        "关卡 1": [60, 100, 150],
        "关卡 2": [60, 100, 150],
        "关卡 3": [60, 100, 150],
        "关卡 4": [60, 100, 150],
        "关卡 5": [60, 100, 150],
        "关卡 6": [60, 100, 150],
        "关卡 7": [60, 100, 150],
    },
    "热兵器时代": {
        "关卡 1": [60, 100, 150],
        "关卡 2": [60, 100, 150],
        "关卡 3": [60, 100, 150],
        "关卡 4": [60, 100, 150],
        "关卡 5": [60, 100, 150],
        "关卡 6": [60, 100, 150],
        "关卡 7": [60, 100, 150],
    },
    "工业时代": {
        "关卡 1": [60, 100, 150],
        "关卡 2": [60, 100, 150],
        "关卡 3": [60, 100, 150],
        "关卡 4": [60, 100, 150],
        "关卡 5": [60, 100, 150],
        "关卡 6": [60, 100, 150],
        "关卡 7": [60, 100, 150],
    },
    "重兵器时代": {
        "关卡 1": [60, 100, 150],
        "关卡 2": [60, 100, 150],
        "关卡 3": [60, 100, 150],
        "关卡 4": [60, 100, 150],
        "关卡 5": [60, 100, 150],
        "关卡 6": [60, 100, 150],
        "关卡 7": [60, 100, 150],
    },
    "核武器时代": {
        "关卡 1": [60, 100, 150],
        "关卡 2": [60, 100, 150],
        "关卡 3": [60, 100, 150],
        "关卡 4": [60, 100, 150],
        "关卡 5": [60, 100, 150],
        "关卡 6": [60, 100, 150],
        "关卡 7": [60, 100, 150],
    },
    "反物质时代": {
        "关卡 1": [60, 100, 150],
        "关卡 2": [60, 100, 150],
        "关卡 3": [60, 100, 150],
        "关卡 4": [60, 100, 150],
        "关卡 5": [60, 100, 150],
        "关卡 6": [60, 100, 150],
        "关卡 7": [60, 100, 150],
    },
}

export const treasureBoxAward = {
    "冷兵器时代": {
        "关卡 1": [40, 60, 100],
        "关卡 2": [40, 60, 100],
        "关卡 3": [40, 60, 100],
        "关卡 4": [40, 60, 100],
        "关卡 5": [40, 60, 100],
        "关卡 6": [40, 60, 100],
        "关卡 7": [40, 60, 100],
    },
    "热兵器时代": {
        "关卡 1": [40, 60, 100],
        "关卡 2": [40, 60, 100],
        "关卡 3": [40, 60, 100],
        "关卡 4": [40, 60, 100],
        "关卡 5": [40, 60, 100],
        "关卡 6": [40, 60, 100],
        "关卡 7": [40, 60, 100],
    },
    "工业时代": {
        "关卡 1": [40, 60, 100],
        "关卡 2": [40, 60, 100],
        "关卡 3": [40, 60, 100],
        "关卡 4": [40, 60, 100],
        "关卡 5": [40, 60, 100],
        "关卡 6": [40, 60, 100],
        "关卡 7": [40, 60, 100],
    },
    "重兵器时代": {
        "关卡 1": [40, 60, 100],
        "关卡 2": [40, 60, 100],
        "关卡 3": [40, 60, 100],
        "关卡 4": [40, 60, 100],
        "关卡 5": [40, 60, 100],
        "关卡 6": [40, 60, 100],
        "关卡 7": [40, 60, 100],
    },
    "核武器时代": {
        "关卡 1": [40, 60, 100],
        "关卡 2": [40, 60, 100],
        "关卡 3": [40, 60, 100],
        "关卡 4": [40, 60, 100],
        "关卡 5": [40, 60, 100],
        "关卡 6": [40, 60, 100],
        "关卡 7": [40, 60, 100],
    },
    "反物质时代": {
        "关卡 1": [40, 60, 100],
        "关卡 2": [40, 60, 100],
        "关卡 3": [40, 60, 100],
        "关卡 4": [40, 60, 100],
        "关卡 5": [40, 60, 100],
        "关卡 6": [40, 60, 100],
        "关卡 7": [40, 60, 100],
    },
}

//#region 奖励类型
export enum AWARYTYPE {
    GOLD,
    MASONRY,
}


//#region 任务
export type Task = {
    type: TASKTYPE,
    label: string,
    curProgress: number,
    totalProgress: number,
    award: number,
}

export const awardMasonry = [40, 60, 80, 100, 120];

export enum TASKTYPE {
    GOLD = "GOLD",
    MONSTER = "MONSTER",
    FOOD = "FOOD",
    CONSUME = "CONSUME",
}

export enum TASKLABEL {
    GOLD = "累计获得金币",
    MONSTER = "累计消灭小怪",
    FOOD = "累计获得能量",
    CONSUME = "累计消费金币",
}

export const taskRequire = {
    "GOLD": {
        "关卡 1": 904,
        "关卡 2": 1212,
        "关卡 3": 2390,
        "关卡 4": 2780,
        "关卡 5": 3493,
        "关卡 6": 4788,
        "关卡 7": 5555,
    },
    "MONSTER": {
        "关卡 1": 20,
        "关卡 2": 50,
        "关卡 3": 30,
        "关卡 4": 49,
        "关卡 5": 20,
        "关卡 6": 43,
        "关卡 7": 51,
    },
    "FOOD": {
        "关卡 1": 60,
        "关卡 2": 70,
        "关卡 3": 99,
        "关卡 4": 196,
        "关卡 5": 182,
        "关卡 6": 196,
        "关卡 7": 196,
    },
    "CONSUME": {
        "关卡 1": 904,
        "关卡 2": 1212,
        "关卡 3": 2390,
        "关卡 4": 2780,
        "关卡 5": 3493,
        "关卡 6": 4788,
        "关卡 7": 5555,
    },
}




